<template>
    <div class="studentifo">
        <h3 v-text="msg"></h3>
        <p>学生姓名：{{name}}</p>
        <p>年龄：{{age}}</p>
        <button @click="welcome">欢迎</button>
    </div>
</template>

<script>

export default {
    name:"StudentNa",
    data(){
        return {
            msg:"学生个人信息",
            name:'xiaoming',
            age:21
        }
    },
    methods:{
        welcome(){
            this.hello()
        }
    }
}
</script>

<style scoped>   
/* 使用scoped可让该css样式只服务于该组件 */
    .studentifo{
        background-color: black;
    }
</style>